Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Symfony Webpack Encore instead of Assetic or Component Manager #63

Merged
merged 2 commits into from
Mar 20, 2019

Conversation

bellisk
Copy link
Contributor

@bellisk bellisk commented Mar 11, 2019

@bellisk
Copy link
Contributor Author

bellisk commented Mar 11, 2019

This adds more documentation to the section that @dbu removed in #61 -- we should fix that before merging this.

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one! regarding the merging, it could make sense to merge this one first (i have some minor input that could be adressed before merging) and i can rebase the documentation cleanup on this, and move the asset management to the documentation.

this change would be really good to get merged before releasing 3.0. the documentation cleanup is less critical.

i noticed that this repository has no CHANGELOG.md file. i guess most of the time this will be taken as starting point and people won't track the original repository. still, i wonder if it would make sense to add a changelog and track such important things, for people who want to use this repository to update their sculpin installation. or alternatively, we could add a text to blog.sculpin.io that explains how to upgrade your sculpin installation to encore.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
<link rel="apple-touch-icon" sizes="512x512" href="{{ site.url }}/images/jackson/512x512.png">
<link rel="apple-touch-icon" sizes="1024x1024" href="{{ site.url }}/images/jackson/1024x1024.png">
<link rel="apple-touch-icon" sizes="2048x2048" href="{{ site.url }}/images/jackson/2048x2048.png">
<link rel="shortcut icon" sizes="76x76" href="{{ site.url }}/build/jackson/76x76.png">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to move the images to build, or could we keep them in the old location? this could be annoying for people who customized their templates. does encore do something with the images?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, all it does is copy them into the build/assets directory. I can move them back to how they were but personally I find it neater to have css + js + images all in the assets folder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I prefer to have different folders for css, js, and images because putting everything in one tends to get messy over time. If this could be configurable that would be even better imho, giving flexibility to everyone setting up how they like it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see the point of having "images" that are basically icons and stuff that is referenced from the css in the same main folder as the css itself. content images is a different topic.

i don't think there is any configuration needed - encore copies them when they are in asset, otherwise the template needs to reference the original path. and having a configuration injected into the template feels too indirect to me.

what if we call that folder "icons" instead of "images" but keep it in assets? would that help to be more clear what it is meant for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, when I said "css + js + images all in the assets folder," I meant that there would be separate folders for css, js, and images, all within the assets folder. (Which is how the project is set up in this PR.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The folders that Encore copies to and from are already configured within the webpack.config.js file, see: https://github.com/sculpin/sculpin-blog-skeleton/blob/2f26a9ce05aedd5db40817e7197948ebe066da3b/webpack.config.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the images in question are really only icons, I think it's a good compromise to rename the folder 'icons' in this example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The folders that Encore copies to and from are already configured within the webpack.config.js file, see: /webpack.config.js@2f26a9c

Ah ok great! Cause if for some reason my images path changes in blog posts all paths on the site and external references would have to be updated. But looking at that I can change that to my liking and don't have to worry about it 👍

source/_layouts/default.html Show resolved Hide resolved
@beryllium
Copy link
Member

I like the blog post idea. I think the changelog approach doesn't quite work in this context, but perhaps a github release notes entry with a link to the blog post would be good.

source/_layouts/default.html Outdated Show resolved Hide resolved
@dbu
Copy link
Contributor

dbu commented Mar 13, 2019

@bellisk would you be up to write that blog post? as the blog is sculpin, it can be done as a pull request against the blog.sculpin.io repository. if you don't want to, i can try to do something.

and can you please rebase? there is a conflict in composer.json/.lock now, from me updating to sculpin/sculpin to 3.

@bellisk
Copy link
Contributor Author

bellisk commented Mar 13, 2019

Rebased to fix the composer.lock conflict.

@bellisk
Copy link
Contributor Author

bellisk commented Mar 13, 2019

Yes, I can write the blog post. That's a cool idea. :)

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, looks good to me!

Copy link
Member

@beryllium beryllium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'll get it merged.

@beryllium beryllium merged commit 7679cb8 into sculpin:master Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants